package org.rency.crawler.dal.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * 描述: 抓取页面
 * 类型: JAVA<br>
 * 最近修改时间:2017/8/4 11:10<br>
 *
 * @author CaiyuRen
 * @version [版本号, V1.0]
 * @since 2017/8/4 11:10
 */
@Document(collection = "fetchPage")
@CompoundIndexes({
    @CompoundIndex(name = "uidx_name", def = "{'docNo':1}", unique = true)})
public class FetchPageDO extends BaseDO {

  @Id
  private String id;

  /**
   * 页面标识(URL MD5)
   */
  private String docNo;

  /**
   * 页面地址
   */
  private String docUri;

  /**
   * 页面快照
   */
  private byte[] html;

  /**
   * 页面内容(文本)
   */
  private byte[] text;

  /**
   * 页面签名
   */
  private String finger;

  /**
   * 字符集
   */
  private String charset;

  /**
   * 标题
   */
  private String title;

  /**
   * 关键字
   */
  private String keywords;

  /**
   * 描述
   */
  private String description;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getDocNo() {
    return docNo;
  }

  public void setDocNo(String docNo) {
    this.docNo = docNo;
  }

  public String getDocUri() {
    return docUri;
  }

  public void setDocUri(String docUri) {
    this.docUri = docUri;
  }

  public byte[] getHtml() {
    return this.html;
  }

  public void setHtml(byte[] html) {
    this.html = html;
  }

  public byte[] getText() {
    return this.text;
  }

  public void setText(byte[] text) {
    this.text = text;
  }

  public String getFinger() {
    return finger;
  }

  public void setFinger(String finger) {
    this.finger = finger;
  }

  public String getCharset() {
    return charset;
  }

  public void setCharset(String charset) {
    this.charset = charset;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public String getKeywords() {
    return keywords;
  }

  public void setKeywords(String keywords) {
    this.keywords = keywords;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }
}
